﻿<%@ Page Title="" Language="C#" MasterPageFile="~/common/AfterLogin.master" AutoEventWireup="true" CodeFile="fd_statement.aspx.cs" Inherits="fd_statement" %>

   <asp:Content ID="leftMenu" ContentPlaceHolderID="leftMenu" Runat="Server">
          <li><a href="<%= Page.ResolveUrl("~/product/fixed_deposit/user/fd_statement.aspx")%>">
        E-Statement</a></li>

        <li><a href="<%= Page.ResolveUrl("~/product/fixed_deposit/user/certificate.aspx")%>">
         Deposit Certificate</a></li>

         <li><a href="<%= Page.ResolveUrl("~/product/fixed_deposit/user/appform.aspx")%>">
         Application Form</a></li>

         <li><a href="<%= Page.ResolveUrl("~/product/fixed_deposit/user/terminate.aspx")%>">
         Terminate Account</a></li>
</asp:Content>

<asp:Content ID="Content1" ContentPlaceHolderID="content" Runat="Server">
    
    <h1>Fixed Deposit Statement</h1>
    <p>
        &nbsp;</p>
    <p>
        <asp:GridView ID="gvEstatement" runat="server" AutoGenerateColumns="False" 
            BackColor="#DEBA84" BorderColor="#DEBA84" BorderStyle="None" BorderWidth="1px" 
            CellPadding="3" CellSpacing="2" DataKeyNames="accountNo" 
            DataSourceID="EstatementDataSource" >
            <AlternatingRowStyle BackColor="White" />
            <Columns>
                <asp:BoundField DataField="accountNo" HeaderText="Account No" ReadOnly="True" 
                    SortExpression="accountNo" />
                <asp:BoundField DataField="accountType" HeaderText="Account Type" 
                    SortExpression="accountType" />
                <asp:BoundField DataField="fName" HeaderText="fName" 
                    SortExpression="fName" Visible="False" />
                <asp:BoundField DataField="lName" HeaderText="lName" 
                    SortExpression="lName" Visible="False" />
                
                <asp:TemplateField HeaderText="Depositor"   SortExpression="lastname">
                <ItemTemplate>
                <asp:Label ID="Label1" runat="server" Text='<%#Eval("fName")+ " " + Eval("lName")%>' ></asp:Label>

                </ItemTemplate>

                </asp:TemplateField>
                <asp:BoundField DataField="DepositAmount" HeaderText="Deposit Amount" 
                    SortExpression="DepositAmount" />
                <asp:BoundField DataField="tenors" HeaderText="Tenors" 
                    SortExpression="tenors" />
                <asp:BoundField DataField="effectiveDate" HeaderText="Effective Date" 
                    SortExpression="effectiveDate" DataFormatString="{0:d}" />
                <asp:BoundField DataField="maturityDate" HeaderText="Maturity Date" 
                    SortExpression="maturityDate" DataFormatString="{0:d}" />
                <asp:BoundField DataField="certNo" HeaderText="Certificate No" 
                    SortExpression="certNo" />
            </Columns>
            <FooterStyle BackColor="#F7DFB5" ForeColor="#8C4510" />
            <HeaderStyle BackColor="#A55129" Font-Bold="True" ForeColor="White" />
            <PagerStyle ForeColor="#8C4510" HorizontalAlign="Center" />
            <RowStyle BackColor="#FFF7E7" ForeColor="#8C4510" />
            <SelectedRowStyle BackColor="#738A9C" Font-Bold="True" ForeColor="White" />
            <SortedAscendingCellStyle BackColor="#FFF1D4" />
            <SortedAscendingHeaderStyle BackColor="#B95C30" />
            <SortedDescendingCellStyle BackColor="#F1E5CE" />
            <SortedDescendingHeaderStyle BackColor="#93451F" />
        </asp:GridView>
        
    </p>
    <p>
        <asp:SqlDataSource ID="EstatementDataSource" runat="server" 
            ConnectionString="<%$ ConnectionStrings:ConnectionString %>" 
            
            
            
            SelectCommand="SELECT [accountNo], [accountType], [fName], [lName], [DepositAmount], [tenors], [effectiveDate], [maturityDate], [certNo] FROM [FIXED_DEPOSIT] WHERE ([custID] = @custID)  AND status='Active'">
            <SelectParameters>
                <asp:SessionParameter Name="custID" SessionField="userId" Type="String" />
            </SelectParameters>
        </asp:SqlDataSource>
        
    </p>
    
</asp:Content>

